//
//  PYTable.h
//  pyfmdbdemo
//
//  Created by terry peng on 15/12/2.
//  Copyright © 2015年 pengyong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MHStructure.h"
#import "MHFMDBHeader.h"

@interface MHTable : NSObject

@property (nonatomic,copy) MHFMDB * db;

@property(nonatomic,strong)NSString *tableName;

@property(nonatomic,strong)NSString *databaseName;

@property(nonatomic,strong)MHStructure *structure;

- (NSString *)lastSql;

- (NSString *)databasePath;

- (NSUInteger)count;

- (BOOL)isEmpty;

#pragma mark - HAS

- (BOOL)hasWhere:(NSString *)where;

- (BOOL)hasFields:(NSDictionary *)fields;

#pragma mark - origin sql

- (NSArray *)executeQueryWithSql:(NSString *)sql;

- (BOOL)executeUpdateWithSql:(NSString *)sql;

@end
